Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
"POST http://localhost:4000/api/upload_file net::ERR_BLOCKED_BY_CLIENT" al publicar datos de formulario a través de fetch

Estoy tratando de crear una aplicación de carga de archivos con React y Node.js en contenedores. Me quedé atascado con el error cuando intento cargar el archivo. La consola del desarrollador dice así en el servidor VPS.

 POST http://localhost:4000/api/upload_file net::ERR_BLOCKED_BY_CLIENT

Creé el contenedor acoplable Node.js en http://localhost:4000 y acepto la solicitud de publicación en la ruta /api/upload_file y el contenedor React en http://localhost:3000 que acepta la solicitud de obtención en la interfaz.

Mi archivo javascript frontend relacionado con fetch está aquí.

 const TARGET = process.env.TARGET || 'localhost:4000' export default async function uploadFile(formData) { const fetchedData = await fetch(`http://${TARGET}/api/upload_file`, { method: 'POST', body: formData }) .then((response) => { if (response.ok) { return response.json() } else { throw new Error('Something went wrong') } }) .then(res => { return { filename: res?.filename } }) .catch((error) => { console.log(error) }) return fetchedData }

Busqué las soluciones, pero parece que el bloqueador de anuncios del navegador causa el error... Probé Chrome, Firefox y Brave, y obtuve los mismos resultados.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!